<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>富文本插件的使用</title>
</head>
<body>
<p>
    wangEditor的基本使用
</p>
<div>

    <div id="text-container" class="text"></div>

    <button id="btnSubmit">
         提交
    </button>
</div>
<script src="https://unpkg.com/wangeditor/dist/wangEditor.min.js"></script>
</body>
<script>

    var E = window.wangEditor;
    var editor = new E("#text-container");
    editor.create();


    document.getElementById('btnSubmit').onclick=function () {
        alert(editor.txt.html());
    }

</script>
</html>